package com.walkline.weibo.dao;

import org.json.me.JSONObject;

import com.walkline.weibo.WeiboException;
import com.walkline.weibo.WeiboSDK;
import com.walkline.weibo.inf.Remind;

public class WeiboRemind extends WeiboObject implements Remind
{
	private int _status = 0;
	private int _follower = 0;
	private int _cmt = 0;
	private int _dm = 0;
	private int _mention_status = 0;
	private int _mention_cmt = 0;
//	private int _all_unread_count = 0;

	public WeiboRemind(WeiboSDK weibo, JSONObject jsonObject) throws WeiboException
	{
		super(weibo, jsonObject);

		JSONObject remind = jsonObject;
		if (remind != null)
		{
			_status = remind.optInt("status");
			_follower = remind.optInt("follower");
			_cmt = remind.optInt("cmt");
			_dm = remind.optInt("dm");
			_mention_status = remind.optInt("mention_status");
			_mention_cmt = remind.optInt("mention_cmt");
		}
	}

	/**
	 * 新微博未读数
	 */
	public int getStatus() {return _status;}

	public void setStatus(int count) {_status = count;}

	/**
	 * 新粉丝数
	 */
	public int getFollower() {return _follower;}

	public void setFollower(int count) {_follower = count;}

	/**
	 * 新评论数
	 */
	public int getCmt() {return _cmt;}

	public void setCmt(int count) {_cmt = count;}

	/**
	 * 新私信数
	 */
	public int getDm() {return _dm;}

	public void setDm(int count) {_dm = count;}

	/**
	 * 新提及我的微博数
	 */
	public int getMentionStatus() {return _mention_status;}

	public void setMentionStatus(int count) {_mention_status = count;}

	/**
	 * 新提及我的评论数
	 */
	public int getMentionCmt() {return _mention_cmt;}

	public void setMentionCmt(int count) {_mention_cmt = count;}

	/**
	 * 获取新评论数、新私信、新提及我的微博、新提及我的评论数的总和
	 */
	public int getAllUnreadCount() {return _cmt + _dm + _mention_status + _mention_cmt;}
}